<template>
  <!-- 我的收藏 -->
  <div class="container">
    <van-tabs v-model="active">
      <van-tab title="视频收藏">
        <collect-list type="1"/>
      </van-tab>
      <van-tab title="新闻收藏">
        <collect-list type="0"/>
      </van-tab>
    </van-tabs>
  </div>
</template>
<script>
import collectList from '@/components/collect-list'

export default {
  components: {
    collectList
  },
  data () {
    return {
      active: 0
    }
  },
  watch: {
    active () {
      window.sessionStorage.setItem('collectType', this.active)
    }
  },
  created () {
    const active = window.sessionStorage.getItem('collectType') || 0
    this.active = active
  }
}
</script>
